<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    

    <script>

        //组件data 为什么是函数
        //对象
        let  obj = {age:10}
        let obj2 = obj
        //修改数据
         obj2.age = 30
         console.log(obj.age);

         //函数
         function data(){
            return {
                num:10
            }
         }
         let fData = data()
         fData.num =100
        console.log(data());
    </script>
</body>
</html>